package com.lk.ii.service.impl;

import java.util.List;
import com.lk.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.lk.ii.mapper.IiSuggestMapper;
import com.lk.ii.domain.IiSuggest;
import com.lk.ii.service.IIiSuggestService;
import com.lk.common.core.text.Convert;

/**
 * 建议意见Service业务层处理
 * 
 * @author lk
 * @date 2021-02-05
 */
@Service
public class IiSuggestServiceImpl implements IIiSuggestService 
{
    @Autowired
    private IiSuggestMapper iiSuggestMapper;

    /**
     * 查询建议意见
     * 
     * @param id 建议意见ID
     * @return 建议意见
     */
    @Override
    public IiSuggest selectIiSuggestById(Long id)
    {
        return iiSuggestMapper.selectIiSuggestById(id);
    }

    /**
     * 查询建议意见列表
     * 
     * @param iiSuggest 建议意见
     * @return 建议意见
     */
    @Override
    public List<IiSuggest> selectIiSuggestList(IiSuggest iiSuggest)
    {
        return iiSuggestMapper.selectIiSuggestList(iiSuggest);
    }

    /**
     * 新增建议意见
     * 
     * @param iiSuggest 建议意见
     * @return 结果
     */
    @Override
    public int insertIiSuggest(IiSuggest iiSuggest)
    {
        iiSuggest.setCreateTime(DateUtils.getNowDate());
        return iiSuggestMapper.insertIiSuggest(iiSuggest);
    }

    /**
     * 修改建议意见
     * 
     * @param iiSuggest 建议意见
     * @return 结果
     */
    @Override
    public int updateIiSuggest(IiSuggest iiSuggest)
    {
        return iiSuggestMapper.updateIiSuggest(iiSuggest);
    }

    /**
     * 删除建议意见对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteIiSuggestByIds(String ids)
    {
        return iiSuggestMapper.deleteIiSuggestByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除建议意见信息
     * 
     * @param id 建议意见ID
     * @return 结果
     */
    @Override
    public int deleteIiSuggestById(Long id)
    {
        return iiSuggestMapper.deleteIiSuggestById(id);
    }
}
